A media gateway allows media to be transmitted between data terminals in different networks. A high level overview of an example application, omitting lower level details, of media transmission between two data terminals in different networks connected through a media gateway is shown in FIG. 6. Media transmission typically begins after a session is established between a data terminal A 6010 and a media Gateway, 6030, as well as a data terminal B 6110 and the media gateway, 6030, which in effect forms a media transmission channel between the data terminals A 6010 and B 6110 situated in different networks. Here the media is transmitted using quantized transportation units typically referred to as packets to the media gateway through a first network into the Incoming Buffer 6040 of the media gateway 6030. The Pass-Through module then extracts a data packet from the incoming buffer 6040 and adapts it to the format acceptable by network 2, the target network of the output channel, and places a new data packet in the outgoing buffer 6060. The packets are then sent out to network 2 6100 and received by the data terminal B 6110. The same operation is performed for the media streams in the opposite direction. For example, the data terminal A 6010 could be a video conferencing terminal operating in a SIP packet-switched network, and the data terminal B 6110 could be a terminal in a mobile network operating using a circuit-switched protocol such as 3G-324M, in this case the media gateway 6030 involves adapting the data carrying packets between a packet-switched network and a circuit-switched network.
The pass-through operation should be performed as fast as possible, as the transmission of media through the media gateway should be a transparent operation to the data terminals. One issue associated with compressed video bitstream conversion is the different packaging rules applied to media stream units in different networks. Another issue is in the delay caused by the process of fully decoding and re-encoding the media bits-stream due to the waiting necessary for sufficient data to be received to perform full decoding and re-encoding.
In digital media coding standards, media bitstreams are composed of discrete media stream units. The format of a media stream unit is related to the type of information that is produced by the video encoder. Examples of such units are macro-blocks, group of blocks (GOB), slices or slice headers. In a sophisticated media coding standard, the media stream unit contains a header, which indicates the type of information within a media stream unit. For example, in the case of the ITU-T H.264 video encoding standard, a video encoder outputs a bitstream composed of a series of units with each defined as a Network Abstraction Layer Unit (NALU), whereby different network abstraction layer units indicate different types of information within the bit-stream. The size of each NALU varies according to the NALU type and amount of information that the NALU contains.
In order for the media to be transported in the network, the media stream units are segmented and packetized into data packets before transmission. How the media stream units are segmented depends on the application performing the segmentation and the type of network transport layer carrying the media stream units. In some network transport layers, data packetization follows a strict rule on how the media stream units should be packed into the data packets before transportation can occur. Such rules can be found when the H.264 NALU is transported using the Real-Time Transport Protocol (RTP) over Internet Protocol (IP) networks. In such networks, three techniques of packaging the NALU into an RTP payload, are allowed according to the Internet Engineering Task Force (IETF) recommendation RFC3984. In the first case, one media stream unit is fitted exactly into one RTP payload packet, known as the Single Unit (SU), for transmission. The media stream unit can be too large or too small for efficient transmission over the designated network. For example, in a H.264, the Picture Parameter Set (PPS) NALU and the Sequence Parameter Set (SPS) NALU which contain the information for decoding the bit-stream is only a few bytes long, while the Slice NALU which can contain media for reconstruction of part or all of the frame can be hundreds or thousands of bytes long. In the case where the media stream unit is too large, one media stream unit is fragmented into multiple data packets. In RFC3984, the RTP packet that contains a fragment of an NALU is known as a Fragmentation Unit (FU). In the case where a media stream unit is too small, several media stream units are aggregated into one data packet for more efficient transmission. In RFC3984, the RTP packet that contains multiple NALUs is known as an Aggregation Unit (AU).
In other networks' transport layers, the mapping rule of the media stream unit to data packet may be more relaxed. The media stream units can be transmitted in sequence, separated for example by a delimiter, or the media stream unit may have an indication of the length of the packet. This can be seen when an H.264 bit-stream is transported over circuit-switched 3G mobile networks defined by 3G-324M where the H.264 Annex B byte stream format is adopted as the definition of media stream units, whereby each H.264 NALU is separated by a delimiter called a start code (SC) in the bit-stream. In the mandatory mode, there is no restriction on how an NALU is packed into data packets, known as Service Data Units (SDU), except that the first NALU of the access unit is aligned with the SDU boundary.
An issue arises when media stream units are transmitted from a network where the rules for packaging the media stream units to data packets are not strict to a network where the rules applying to packaging are strict.
Another issue that may arise in the pass through is the possibility of the video becoming non conformant due to transmission. In wireless networks, the error rate is much higher than in wired networks. When transmitting video from a wireless network to a wired network, some decoders built for wired networks may not handle errors caused by the wireless network. As a media gateway is required to handle a large variety of video clients, ensuring the conformance of the video bitstream is an important consideration.